﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace control.Biz
{
    public class BizChiTietDonHang
    {
        public int ID { get; set; }
        public int SoLuong { get; set; }
        public decimal ThanhTien
        {
            get { return (int)(SanPham.GiaBan * SoLuong); }
        }
        private BizSanPham sanpham;
        public BizSanPham SanPham
        {
            set { sanpham = value; }
            get 
            {
                if (sanpham == null)
                    sanpham = new BizSanPham();
                return sanpham;
            }
        }
        public string HinhSP
        {
            get { return SanPham.Hinh; }
        }
        public string TenSP
        {
            get { return SanPham.TenSanPham; }
        }
        public string GiaSP
        {
            get { return ((int)SanPham.GiaBan).ToString(); }
        }
        public int TonKho
        {
            get { return SanPham.SoLuong; }
        }
        public int IDSP
        {
            get { return sanpham.ID; }
        }
    }
}
